#include "functions.h"
#include "parse_tree_def.h"
#include <stdlib.h>
#include <stdio.h>

int main()
{
    try
    {
        string s = "( 	(	( @x)(P(x,y)>(Q(x)!R(y))) % (@x)(#y)(P(x,y)!~Q(z))	)	>R(y) )";
        erase_space_tab(s); //清除空格、\t
        node *root = new node();
        char *head = (char *)s.data();
        spray(root, head);
        hierarchical_traverse(root, show);
    }
    catch (const std::exception &e)
    {
        std::cerr << e.what() << '\n';
    }
}